package com.lanzchina.lanclass.service;

import com.lanzchina.lanclass.constant.Constant;
import com.lanzchina.lanclass.repository.OpenIdRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OpenIdService {

    @Autowired
    private OpenIdRepository openIdRepository;

    public String getOpenId(String code) {
        return openIdRepository.getOpenid(code, Constant.APPID, Constant.SECRET, Constant.GRANT_TYPE);
    }
}
